#include "binadd.h"
#include <conio.h>

int main(){
	CBinCode C(14, 28) ;
	cin >> C ;
	C.convert() ;

	CBinWord tmp1(2), tmp2(14), r1(28), r2(28) ;
	// cout << C ;
	for ( int i=1; i < (1 << tmp1.n); i++ )	{
		for ( int j=1; j < (1 << tmp2.n); j++ )	{
			tmp1.num = i ;
			tmp2.num = j ;
			r1 = tmp1^tmp2 ;
			r2 = tmp2^tmp1 ;
			/*
			if ( ! (C*r1).num ) {
				cout << r1 << endl;
				cerr << " = " << tmp1 << " ^ " << tmp2 << endl;
			}
			*/
			if ( ! (C*r2).num ) {
				cout << r2 << endl;
				cerr << " = " << tmp2 << " ^ " << tmp1 << endl;
			}
		}
	}
	cout << '*' ;
	return 0 ;
}
